﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class Commctrol_GoodAgentList : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            baindData();
        }
    }

    private void baindData()
    {
        this.rtGoodAgentList.DataSource = GetGoodAgentList();
        this.rtGoodAgentList.DataBind();
    }

    private DataTable GetGoodAgentList()
    {
        DataTable dtGoodList = new DataTable();
        dtGoodList.Columns.Add("Name");
        dtGoodList.Columns.Add("Imag");
        dtGoodList.Columns.Add("Level");
        dtGoodList.Columns.Add("Company");
        dtGoodList.Columns.Add("Call");
        dtGoodList.Columns.Add("count");
        //获取数据源
        #region 模拟
        for (int i = 0; i < 5; i++)
        {
            DataRow dr = dtGoodList.NewRow();
            dr["Name"] = "小六子";
            dr["Imag"] = "http://photo1.foloda.com//photo/LogoBig/20081013/0sxurldb.jpeg";
            dr["Level"] = "★★☆☆☆";
            dr["Company"] = "君松地产 莘建店";
            dr["Call"] = "1988888888";
            dr["count"] = "30";
            dtGoodList.Rows.Add(dr);
        }
        #endregion

        return dtGoodList;
    }
}
